def selectSort(iterabal):
    lenth = len(iterabal)
    for i in range(lenth-1):
        maxindex = i
        for j in range(i+1,lenth):
            if iterabal[j] > iterabal[maxindex]:
                maxindex = j
        if iterabal[maxindex] != iterabal[i]:
            iterabal[maxindex],iterabal[i] = iterabal[i],iterabal[maxindex]
    return iterabal
list1 = [1,2,34,64333,33,45,9]
print(selectSort(list1))